<template>
  <div class="home">
    <Header/>
    <Banner :Banner="banners"/>
    <Popularsonglist :results="results"/>
  </div>
</template>

<script>
// @ is an alias to /src

import { GetsingDate,GetBannerDate,Recommendtheplaylist} from "@/request/api"
import Banner from "@/components/Banner"
import Header from "@/components/Header"
import Popularsonglist from "@/components/Popularsonglist"
export default {
  name: 'Home',
  data(){
    return{
       /* 轮播图 */
       banners:[],
       /* 歌单分类 */
       results:[]
    }
  },
  components: {
      Banner,Header,Popularsonglist
  },
  created(){
       GetsingDate({
         id:6452
       }).then((res)=>{
         console.log(res);
       }),
        GetBannerDate().then((res)=>{
         this.banners=res.data.banners
        console.log('banner图',res);
        })
        /* 获取推荐歌单*/
      Recommendtheplaylist().then((res)=>{
        this.results=res.data.result
        console.log('歌单分类',this.results)
      })
  }
}
</script>
